const Person = function () { }
const p1 = new Person()
console.log(p1 instanceof Person) // true

var str = 'hello world'
console.log(str instanceof String) // false

var str1 = new String('hello world')
console.log(str1 instanceof String) // true

class PrimitiveString {
    static [Symbol.hasInstance](x) {
        return typeof x === 'string'
    }
}
console.log('hello world' instanceof PrimitiveString) // true